home *** CD-ROM | disk | FTP | other *** search
- /* The external variables of REXX/imc (C) Ian Collier 1992 */
-
- #include<stdio.h> /* since a FILE will occur later */
- #include <setjmp.h> /* since a jmp_buf will occur later */
- extern int types[]; /* Three character type tables */
- extern int alphs[];
- extern int symbs[];
- extern char fname[]; /* the current file name */
- extern char extension[]; /* the default file extension */
- extern int extlen; /* and its length */
- extern int lines; /* number of lines in current source */
- extern int stmts; /* number of statements in current program*/
- extern char **source; /* the source of the current program */
- extern program *prog; /* the current program, tokenised */
- extern char *labelptr; /* start of label table */
- extern char *vartab; /* start of variable table */
- extern int *varstk; /* offsets to levels in variable table */
- extern unsigned varstklen; /* number of elements allocated to varstk */
- extern unsigned vartablen; /* space allocated to vartab */
- int varstkptr; /* current level number */
- extern char *cstackptr; /* start of calculator stack */
- extern unsigned ecstackptr; /* length of calculator stack */
- extern unsigned cstacklen; /* space allocated to calculator stack */
- extern char *workptr; /* start of workspace */
- extern unsigned eworkptr; /* amount of workspace used */
- extern unsigned worklen; /* space allocated to workspace */
- extern char *pstackptr; /* start of program stack */
- extern unsigned epstackptr; /* length of program stack */
- extern unsigned pstacklen; /* space allocated to program stack */
- extern int pstacklev; /* prog stack level within current func */
- extern int totpstacklev; /* total program stack level */
- extern char* hashptr[]; /* pointers to 3 hash tables */
- extern unsigned ehashptr[]; /* lengths of hash tables */
- extern unsigned hashlen[]; /* space allocated to hash tables */
- extern struct sigstruct { /* contexts of all calls to interpreter() */
- short bits; /* and which signals to catch by default */
- short bitson; /* which signals are caught here */
- short callon; /* which signals cause a call */
- short delay; /* which signals are set to "delay" */
- char type; /* condition(i) 0=none, 1=signal, 2=call */
- char which; /* condition(c) */
- char *data; /* condition(d) */
- int ppc[Imax]; /* number of the SIGNAL ON instruction */
- jmp_buf jmp; /* for each signal */
- } *sgstack;
- extern int delayed[Imax]; /* Which signals are pending action */
- extern char *sigdata[Imax]; /* Descriptions for pending signals */
- extern jmp_buf interactbuf; /* context of interactive trace routine */
- extern int interplev; /* nesting level of interpreter() */
- extern int interact; /* interplev of interactive trace, or -1 */
- extern int interactmsg; /* Whether to emit message at interactive */
- extern int ppc; /* statement number being interpreted */
- extern int oldppc; /* saved position in case of error */
- extern int newppc; /* statement to jump to */
- extern char **curargs; /* current arguments, for ARG() */
- extern int *curarglen; /* lengths of current arguments */
- extern char *errordata; /* data to print after error message */
- extern int precision; /* NUMERIC DIGITS */
- extern int fuzz; /* NUMERIC DIGITS minus NUMERIC FUZZ */
- extern char numform; /* 0=SCIENTIFIC, 1=ENGINEERING */
- extern char trcflag; /* what to trace */
- extern char trcresult; /* nesting level of scanning() */
- extern char otrcflag; /* temporary store for trace flag */
- extern char trclp; /* whether to input in interactive mode */
- extern char timeflag; /* bit 0: used elapsed time counter */
- /* bit 1: timestamp in operation */
- /* bit 2: used random number generator */
- extern long secs;extern long microsecs; /* time when TIME(r) last called */
- extern struct timeval timestamp; /* the timestamp, if in operation */
- extern FILE *ttyin,*ttyout; /* access to the terminal */
- extern char *pull; /* storage used for input */
- extern unsigned pulllen; /* space allocated for pull */
- extern char *returnval; /* value returned by EXIT */
- extern int returnlen; /* length of that value */
- extern char *returnfree; /* what to free after returnval is used */
- extern int rxstacksock; /* fd number of stack socket */
- extern char *varnamebuf; /* workspace for evaluating variable names*/
- extern int varnamelen; /* amount of memory allocated for this */
- extern FILE *traceout; /* Where to send trace output */
- extern int lasterror; /* The last error which occurred on I/O */
-
- extern char *conditions[]; /* the condition names */
-